package net.zhnb.service.impl;

import javax.annotation.Resource;

import net.zhnb.bean.Ad;
import net.zhnb.bean.AdKey;
import net.zhnb.dao.AdDao;
import net.zhnb.service.AdService;
import finaler.util.Page;
import finaler.util.PageList;

public class AdServiceImpl implements AdService {

	@Resource
	private AdDao adDao;

	@Override
	public PageList getPageList(Page page) throws Exception {
		return adDao.getPageList(page);
	}

	@Override
	public boolean insert(Ad ad) throws Exception {
		return adDao.insert(ad);
	}

	@Override
	public boolean deleteByKey(AdKey key) throws Exception {
		return adDao.deleteByKey(key);
	}

	@Override
	public Ad findByKey(AdKey key) throws Exception {
		return adDao.findByKey(key);
	}

	@Override
	public boolean update(Ad ad) throws Exception {
		return adDao.update(ad);
	}
	
}
